#ifndef TREENODE_H
#define TREENODE_H
#include <QVariant>

class TreeNode;

typedef TreeNode* TreeNodePtr;

class TreeNode
{
public:
    TreeNode();
    TreeNodePtr parent() const;
    void setParent(const TreeNodePtr p);
    void appendNode(TreeNodePtr node);
    void removeNode(int row);
    QVariant data(int role);
    void setData(int role,QVariant value);
    QList<TreeNodePtr>childs;

private:
    TreeNodePtr mParent=NULL;
    QHash<int,QVariant>mRecord;

};

#endif // TREENODE_H
